/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_UIGestureRecognizerDelegate : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(UIKit.UIGestureRecognizerDelegate); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : UIKit.UIGestureRecognizerDelegate, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodShouldBeRequiredToFailBy0;
        bool isCallingShouldBeRequiredToFailBy0= false;
        
            public override System.Boolean ShouldBeRequiredToFailBy(UIKit.UIGestureRecognizer p0, UIKit.UIGestureRecognizer p1) 
            { 
                if (methodShouldBeRequiredToFailBy0 == null && instance!=null )
                {
                    methodShouldBeRequiredToFailBy0 = instance.Type.GetMethod("ShouldBeRequiredToFailBy", 2);
                }
                if (methodShouldBeRequiredToFailBy0 != null && !isCallingShouldBeRequiredToFailBy0)
                {
                    isCallingShouldBeRequiredToFailBy0 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodShouldBeRequiredToFailBy0, instance, param );
                        
                        
                        isCallingShouldBeRequiredToFailBy0 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ShouldBeRequiredToFailBy *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
        
        IMethod methodShouldBegin1;
        bool isCallingShouldBegin1= false;
        
            public override System.Boolean ShouldBegin(UIKit.UIGestureRecognizer p0) 
            { 
                if (methodShouldBegin1 == null && instance!=null )
                {
                    methodShouldBegin1 = instance.Type.GetMethod("ShouldBegin", 1);
                }
                if (methodShouldBegin1 != null && !isCallingShouldBegin1)
                {
                    isCallingShouldBegin1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodShouldBegin1, instance, param );
                        
                        
                        isCallingShouldBegin1 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ShouldBegin *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
        
        IMethod methodShouldReceivePress2;
        bool isCallingShouldReceivePress2= false;
        
            public override System.Boolean ShouldReceivePress(UIKit.UIGestureRecognizer p0, UIKit.UIPress p1) 
            { 
                if (methodShouldReceivePress2 == null && instance!=null )
                {
                    methodShouldReceivePress2 = instance.Type.GetMethod("ShouldReceivePress", 2);
                }
                if (methodShouldReceivePress2 != null && !isCallingShouldReceivePress2)
                {
                    isCallingShouldReceivePress2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodShouldReceivePress2, instance, param );
                        
                        
                        isCallingShouldReceivePress2 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ShouldReceivePress *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
        
        IMethod methodShouldReceiveTouch3;
        bool isCallingShouldReceiveTouch3= false;
        
            public override System.Boolean ShouldReceiveTouch(UIKit.UIGestureRecognizer p0, UIKit.UITouch p1) 
            { 
                if (methodShouldReceiveTouch3 == null && instance!=null )
                {
                    methodShouldReceiveTouch3 = instance.Type.GetMethod("ShouldReceiveTouch", 2);
                }
                if (methodShouldReceiveTouch3 != null && !isCallingShouldReceiveTouch3)
                {
                    isCallingShouldReceiveTouch3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodShouldReceiveTouch3, instance, param );
                        
                        
                        isCallingShouldReceiveTouch3 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ShouldReceiveTouch *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
        
        IMethod methodShouldRecognizeSimultaneously4;
        bool isCallingShouldRecognizeSimultaneously4= false;
        
            public override System.Boolean ShouldRecognizeSimultaneously(UIKit.UIGestureRecognizer p0, UIKit.UIGestureRecognizer p1) 
            { 
                if (methodShouldRecognizeSimultaneously4 == null && instance!=null )
                {
                    methodShouldRecognizeSimultaneously4 = instance.Type.GetMethod("ShouldRecognizeSimultaneously", 2);
                }
                if (methodShouldRecognizeSimultaneously4 != null && !isCallingShouldRecognizeSimultaneously4)
                {
                    isCallingShouldRecognizeSimultaneously4 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodShouldRecognizeSimultaneously4, instance, param );
                        
                        
                        isCallingShouldRecognizeSimultaneously4 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ShouldRecognizeSimultaneously *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
        
        IMethod methodShouldRequireFailureOf5;
        bool isCallingShouldRequireFailureOf5= false;
        
            public override System.Boolean ShouldRequireFailureOf(UIKit.UIGestureRecognizer p0, UIKit.UIGestureRecognizer p1) 
            { 
                if (methodShouldRequireFailureOf5 == null && instance!=null )
                {
                    methodShouldRequireFailureOf5 = instance.Type.GetMethod("ShouldRequireFailureOf", 2);
                }
                if (methodShouldRequireFailureOf5 != null && !isCallingShouldRequireFailureOf5)
                {
                    isCallingShouldRequireFailureOf5 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodShouldRequireFailureOf5, instance, param );
                        
                        
                        isCallingShouldRequireFailureOf5 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ShouldRequireFailureOf *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
    }
}